﻿''' <summary>
''' This Class will and can be changed by the Script and is used by high Level AI's (currently Heavy)
''' </summary>
''' <remarks></remarks>
Public Class KIScript
    ''' <summary>
    ''' Used to tell the AI what to build or how important a target is.
    ''' </summary>
    ''' <remarks></remarks>
    Public Enum Priorities
        Off
        Very_Low
        Low
        Normal
        High
        Very_High
    End Enum
    ''' <summary>
    ''' Create a new AI handling Script for a Player
    ''' </summary>
    ''' <param name="Player">The Player who owns this Script</param>
    ''' <remarks></remarks>
    Public Sub New(ByVal Player As Integer)
        If Objektverwalter.Spielfeld IsNot Nothing Then
            For I = 0 To Objektverwalter.Spielfeld.Spieler.Length - 1
                If I = 0 Then 'We won't attack Neutral Units
                    Enemy_Priorities.Add(0)
                    Enemy_Priorities_Scriptset.Add(False)
                ElseIf I = Player Then 'We won't attack us
                    Enemy_Priorities.Add(0)
                    Enemy_Priorities_Scriptset.Add(False)
                ElseIf Objektverwalter.Spielfeld.Spieler(I).Team = Objektverwalter.Spielfeld.Spieler(Player).Team Then 'We won't attack Allies
                    Enemy_Priorities.Add(0)
                    Enemy_Priorities_Scriptset.Add(False)
                Else
                    Enemy_Priorities.Add(1)
                    Enemy_Priorities_Scriptset.Add(False)
                End If
            Next
        End If
    End Sub
#Region "Production "
    ''' <summary>
    ''' Should we build Naval Force?
    ''' </summary>
    ''' <remarks></remarks>
    Public Naval_Force As Priorities = Priorities.Normal
    ''' <summary>
    ''' Is Naval Force set by the Script or by the AI.
    ''' </summary>
    ''' <remarks></remarks>
    Public Naval_Force_Scriptset As Boolean = False
    ''' <summary>
    ''' Should we build Air Force?
    ''' </summary>
    ''' <remarks></remarks>
    Public Air_Force As Priorities = Priorities.Normal
    ''' <summary>
    ''' Is Air Force set by the Script or by the AI.
    ''' </summary>
    ''' <remarks></remarks>
    Public Air_Force_Scriptset As Boolean = False
    ''' <summary>
    ''' Should we build Ground Force?
    ''' </summary>
    ''' <remarks></remarks>
    Public Ground_Force As Priorities = Priorities.Normal
    ''' <summary>
    ''' Is Ground Force set by the Script or by the AI.
    ''' </summary>
    ''' <remarks></remarks>
    Public Ground_Force_Scriptset As Boolean = False
    ''' <summary>
    ''' Should we build a lot of expansive Units? only if we play a Game with much Funds.
    ''' </summary>
    ''' <remarks></remarks>
    Public High_Fonds_Production As Boolean = False
    ''' <summary>
    ''' Is High_Fonds_Production Script Set?
    ''' </summary>
    ''' <remarks></remarks>
    Public High_Fonds_Production_Scriptset As Boolean = False
#End Region
#Region "General"
    ''' <summary>
    ''' Decides which Player is our primary Target.
    ''' </summary>
    ''' <remarks></remarks>
    Public Enemy_Priorities As List(Of Integer)
    ''' <summary>
    ''' Tells as if the Value can be changed by our Code.
    ''' </summary>
    ''' <remarks></remarks>
    Public Enemy_Priorities_Scriptset As List(Of Boolean)
#End Region

End Class
